package com.kuaiyin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kuaiyin.enums.Status;
import com.kuaiyin.sampling.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * 部门信息表（含完整审计字段）
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("departments")
@Schema(name = "Departments", description = "部门信息表（含完整审计字段）")
public class Departments extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "部门ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "部门名称")
    private String name;

    @Schema(description = "部门编码")
    private String code;

    @Schema(description = "上级部门ID")
    private Integer parentId;

    @Schema(description = "部门层级")
    private Integer level;

    @Schema(description = "排序权重")
    private Integer sortOrder;

    @Schema(description = "状态：0-禁用 1-启用")
    private Status status;

}
